<?php
/**
 *	[push(push.{modulename})] (C)2012-2099 Powered by abans@qq.com.
 *	Version: 1.0
 *	Date: 2012-11-30 13:35
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

function push_op($tp=1) {
	$push_op = array(
		array('f_rp',lang('plugin/push','push01'),1),
		array('f_rp2',lang('plugin/push','push02'),1),
		array('f_rp3',lang('plugin/push','push03'),1),
		array('f_mv',lang('plugin/push','push04'),1),
		array('f_rm',lang('plugin/push','push05'),1),
	);
	if($tp==1) return $push_op;
	foreach ($push_op as $k => $v) {
		$def['mail'][$v[0]] = $v[2];
	}
	return $def;
}
function push_set_data($uid) {
	$def = push_op('def');
	$data = Adz::fetch_con('plugin_push_set',array('uid'=>$uid));
	if($data) $data['mail'] = Adz::obj_arr(json_decode($data['mail']));
	if(!$data || !is_array($data['mail'])){
		$data['mail'] = $def['mail'];
	}
	return $data;
}

?>